home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / pdcurs21 / flexos / _8bitmod.c < prev    next >
C/C++ Source or Header  |  1993-06-18  |  1KB  |  48 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3.  
  4. #ifndef    NDEBUG
  5. char *rcsid__8bitmod = "$Header: C:\CURSES\flexos\RCS\_8bitmod.c 2.1 1993/06/18 20:24:01 MH Rel MH $";
  6. #endif
  7.  
  8.  
  9.  
  10.  
  11. #ifdef    FLEXOS
  12. /*man-start*********************************************************************
  13.  
  14.   _flexos_8bitmode()    - Puts console into 8 bit mode.
  15.  
  16.   PDCurses Description:
  17.      This routine sets 8 bit mode (no 8 bit attribute) for Flexos.
  18.  
  19.   PDCurses Return Value:
  20.      This function returns OK on success and ERR on error.
  21.  
  22.   PDCurses Errors:
  23.      Under FLEXOS, an ERR will be returned if the s_get() call
  24.      fails, or if the s_set() call fails.  You are referred to
  25.      the Flexos Programmer's Reference Guide for details on the
  26.      actual error.
  27.  
  28.   Portability:
  29.      PDCurses    int _flexos_16bitmode( void );
  30.  
  31. **man-end**********************************************************************/
  32.  
  33. int    _flexos_8bitmode(void)
  34. {
  35. extern    VIRCON    vir;        /* Allocate a Virtual Console Structure */
  36.  
  37.     retcode = s_get(T_VIRCON, 0L, (char *) &vir, (long) sizeof(vir));
  38.     if (retcode < 0L)
  39.         return( ERR );
  40.  
  41.     vir.vc_kbmode = vir.vc_kbmode & ~VCKM_16BIT;
  42.     vir.vc_smode = vir.vc_smode & ~VCKM_16BIT;
  43.  
  44.     retcode = s_set(T_VIRCON, 0L, (char *) &vir, (long) sizeof(vir));
  45.     return( (retcode < 0L) ? ERR : OK );
  46. }
  47. #endif
  48.